import { VideoType } from '@renderer/types/index'
import { defineStore } from 'pinia'
import { ref } from 'vue'

const useConfigStore = defineStore(
  'configStore',
  () => {
    const config = ref({
      sizes: ['1920x1080', '1024x720'],
      size: '1920x1080',
      frames: ['60', '30'],
      frame: '60',
      files: [] as Array<VideoType>,
      videoSaveDirectory: '',
      videoBitrate: 30
    })
    return {
      config
    }
  },
  {
    persist: true
  }
)

export { useConfigStore }
